/////////////////////////////////////////////////////////////////////////////// 
//// FileName: iPN_AuthEnc.h
//// Description: header for AuthCode, String Encode/Decode
//// Author: Charlie Chang (sengfu@gmail.com)
//// All right reserved 2014.
////  Revision History:
////      Create Date: 2014/09/02
////      
////////////////////////////////////////////////////////////////////////////////
#ifndef __INCLUDE_iPN_AuthEnc_H__
#define __INCLUDE_iPN_AuthEnc_H__

#include "iPN_Type.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifndef iPN_API
INT32 iPNAuthCodeCalculate(const CHAR* Prefix, const INT32 SN,
		const CHAR* CheckCode, CHAR* AuthCode, INT32 AuthCodeSize);
INT32 iPNAuthCodeCalculateDID(const CHAR* OwnerDID, CHAR* AuthCode,
		INT32 AuthCodeSize);
INT32 iPNAuthCodeCheck(const CHAR* Prefix, const INT32 SN,
		const CHAR* CheckCode, const CHAR* AuthCode);
CHAR* iPNStringEncode(const CHAR *SourceString, CHAR *DestString,
		const UINT32 DestStringSize, const UINT32 Seed);
#endif

CHAR* iPNStringDecode(const CHAR *SourceString, CHAR *DestString,
		const UINT32 DestStringSize);

#ifdef __cplusplus
}
#endif

#endif  //#ifndef __INCLUDE_iPN_AuthEnc_H__
